import QtQuick 1.0
import "../Delegates"

//Retweetのメニュー用
ListView {
    id: _rootListView
    x: 0
    y: 0
    height: parent.height
    width: parent.width
    clip: true      //これをしないと下へスクロールする時にアクションバーに食い込む

    //最初は自動で読込み
    onXChanged: {
        if((x === 0) && (count < 1)){
            model.getRecent();
        }
    }

    delegate: Delegate{
        width: _rootListView.width

        itemIndex: _status_id
        itemTitle: _screen_name + " / " + _slug
        itemMessage: _text
        itemInformation: makeItemInfomation()
        iconVisible: true
        iconPath: _icon

        function makeItemInfomation(){
            var ret = _name;

            ret += " / " + _mode + "<br />\n";
            ret += "Members : " + _member_count + " / Subscriptions : " + _subscriber_count;

            return ret;
        }

        MouseArea {
            anchors.fill: parent

            onClicked: {
                _selectItemInfo.listId = itemIndex;
                _selectItemInfo.listName = itemMessage;
                _contentContainer.state = "ListStatuses"
            }
        }

    }
}
